//卡片
Vue.component('Card', {
    template: `<div :id="id" :class="[layer?'layer':'']" :style="{'border':layerBorder}" style="display: flex;">
        {{data}}
        <div style="margin: 10px; border-radius: 10px; background-color: white; width: 100%; padding-top: 10px;">
        <slot></slot>
    </div>
    <i v-show="layer&&SortableSwitch" style="position: absolute;top: 0;left: 0; z-index:999; color:#67C23A;" class="el-icon-rank"></i></div>`,
    mixins: [global],
})
Vue.component('CardConfig', {
    template: `<el-card style="background-color: white;">
    <div class="table_titel">
        <div class="titel">卡片组件</div>
        <div class="operation">
            <el-button type="primary" size="small" @click="add">插入组件</el-button>
        </div>
    </div>
    <div><slot></slot></div>
</el-card>`,
    mixins: [globalConfig],
    methods: {
        add() {
            this.$store.commit('setindex', this.id);
        },
    }
})